<template>
  <ElConfigProvider :locale="locale">
    <router-view />
  </ElConfigProvider>
</template>
<script setup lang="ts">
import { ElConfigProvider } from 'element-plus'
import zhCn from 'element-plus/lib/locale/lang/zh-cn'
import en from 'element-plus/lib/locale/lang/en'
import { login } from '@/api/common'
import { useStore } from '@/store'
const store = useStore()
const locale = computed(() => {
  return localStorage.getItem('locale') === 'zhCN' ? zhCn : en
})
store.dispatch('init', 'root')
store.dispatch('product/init', 'product111')
onMounted(() => {
  login()
})

</script>

<style>

</style>
